cmake_minimum_required(VERSION 2.8)

project(maker_binocular_ros)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

find_package(catkin REQUIRED COMPONENTS
    roscpp
    std_msgs
    pcl_conversions
    tf
    sensor_msgs
    laser_geometry
    cv_bridge
)

find_package(OpenCV REQUIRED)

include_directories(
    ./include
    ${catkin_INCLUDE_DIRS}
)

catkin_package(
  INCLUDE_DIRS include
  LIBRARIES maker_binocular
#  CATKIN_DEPENDS other_catkin_pkg
#  DEPENDS system_lib
)

add_executable(maker_binocular 
	src/main.cpp
	src/CameraDriver.cpp
)

target_link_libraries(maker_binocular
	-lusb-1.0
    ${catkin_LIBRARIES}
	${OpenCV_LIBS}
)

## Mark executables and/or libraries for installation
install(TARGETS maker_binocular maker_binocular
   ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
   LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
   RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)


#######################################################
#######specify the install target######################
#######################################################
#install(TARGETS ${PROJECT_NAME}
#  ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
#  LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
#  RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
#)

########################################################
################ install the headers####################
########################################################
#install(DIRECTORY include/${PROJECT_NAME}/
#  DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
#  PATTERN ".svn" EXCLUDE
#)

########################################################
################install subdirectories##################
########################################################
#install(DIRECTORY include/
#  DESTINATION ${CATKIN_GLOBAL_INCLUDE_DESTINATION}
#  PATTERN ".svn" EXCLUDE
#)

########################################################
###install the libraries################################
########################################################
#install(DIRECTORY launch/
#  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
#  PATTERN ".svn" EXCLUDE)
